package SingletonModel;

public class SingletonModel {

	//创建SingletonModel的一个对象
	private static SingletonModel instance = new SingletonModel();

	//让构造函数为private,这样就不会被实例化
	private SingletonModel(){

	}

	//获取唯一可用的对象
	public static SingletonModel getInstance(){
		return instance;
	}

	public void ShowMessage(){
		System.out.println(instance.toString());
	}

}
